import request from "@/utils/request";
export default class OrderAPI {
  
    /// 保存订单
  static netOrderSave(data) {
    return request({
      url: "/api/YzOrder/save",
      method: "post",
      data
    });
  }
    /// 保存订单
  static netOrderUpdate(data) {
    return request({
      url: "/api/YzOrder/update",
      method: "post",
      data
    });
  }
 
  /// 发布订单
  static netOrderPublish(data) {
    return request({
      url: "/api/YzOrder/publish",
      method: "post",
      data
    });
  }

  /// 订单列表 owerUserId 等于自己 就是自己的订单 不传就是抢单大厅
  static netYzOrderGetList(data) {
    return request({
      url: "/api/YzOrder/getList",
      method: "post",
      data
    });
  }
  
  /// 订单详情
  static netYzOrderGet(id) {
    return request({
      url: "/api/YzOrder/get/"+id,
      method: "get",
    });
  }
  
  /// 获取报价列表 orderId
  static netYzOrderPriceGetList(data) {
    return request({
      url: "/api/YzOrderPrice/getList",
      method: "post",
      data,
    });
  }
  /// 获取报价明细
  static netYzOrderPriceGet(id) {
    return request({
      url: "/api/YzOrderPrice/get/" +id,
      method: "get",
    });
  }
 
  /// 选择报价
  static netYzOrderSelectPrice(data) {
    return request({
      url: "/api/YzOrder/selectPrice",
      method: "post",
      data,
    });
  }
  // 取消订单
  static netYzOrderCancel(data) {
    return request({
      url: `/api/YzOrder/cancel/${data.id}`,
      method: "post",
      data,
    });
  }
  // 催单
  static netYzOrderQuick(data) {
    return request({
      url: `/api/YzOrder/reminder/${data.id}`,
      method: "post",
      data,
    });
  }
}
